export default {
  getOption(title, DataUnit, tipName) {
    return {
      title: {
        text: title,
        left: 'center'
      },
      tooltip: {
        trigger: 'axis'
      },
      calculable: true,
      // 设置可缩放
      dataZoom: [{
        id: 'dataZoomX',
        type: 'slider',
        xAxisIndex: [0],
        filterMode: 'filter'
      }],
      grid: {
        left: '11%',
        right: '11%'
      },

      xAxis: {
        type: 'category',
        boundaryGap: true, // 取消左侧的间距
        data: []
      },
      yAxis: {
        type: 'value',
        splitLine: {
          show: true
        }, // 去除网格线
        name: '',
        axisLabel: {
          formatter: `{value} ${DataUnit}` // 设置Y轴，为Y轴添加℃
        }
      },
      series: [{
        name: tipName,
        type: 'line',
        // 设置折线图中表示每个坐标点的符号 emptycircle：空心圆；emptyrect：空心矩形；circle：实心圆；emptydiamond：菱形
        symbol: 'emptydiamond',
        showSymbol: false,
        data: []
      }]
    }
  }
}
